import 'package:freedom/entity/user/user_location.dart';

class GameConst {
  static final List<EmojiInfo> emojiList = [
    EmojiInfo(
        pathName: 'message/ask_money.png',
        code: 'ask_money',
        imageCount: 8,
        playCount: 3,
        row: 1,
        column: 8,
        networkImageStc:
            'http://img.soogif.com/dMaJl14hqvVZh9P6Lt5GrFpx3T1z5Z7X.gif')
  ];
}

final Map<String, UserLocation> userLocation = {};
final List<String> soundMessageArray = [
  "不要吵了，不要吵了，吵啥嘛吵，专心玩游戏把。",
  "不要走，决战到天亮啊。",
  "大家好很高兴见到各位。",
  "诶，各位不好意思啊，我得离开一会儿。",
  "和你合作真是太愉快了啊。",
  "快点啊都等得我花儿都谢了。",
  "您的牌打的也挺好的啊。",
  "你是妹妹还是哥哥啊。",
  "咋交个朋友吧，能告诉我你怎么联系的嘛。",
  "下次咋们再玩把，我会想念大家的。",
  "再见了我会想念大家的。",
  "怎么又断线了，网络怎么这么差啊。"
];

class EmojiInfo {
  // 图片名称
  String pathName;
  String code;
  // 图片数
  int imageCount;
  String networkImageStc;
  // 行数
  int row;
  // 列数
  int column;
  // 播放次数
  int playCount;
  // 休息时间
  double sleep;
  EmojiInfo(
      {required this.pathName,
      required this.code,
      this.imageCount = 1,
      this.row = 1,
      this.column = 1,
      required this.networkImageStc,
      this.playCount = 3,
      this.sleep = 0.1});
}

class RoomState {
  RoomState._();
  // 开始了
  static const int START = 1;
  // 创建
  static const int CREATE = 0;
  // 结束
  static const int OVER = 2;
  // 账单清算状态
  static const int BILL_CLEARING = 3;
  // 换三张状态
  static const int CHANGE = 4;
}

class CardEnum {
  CardEnum._();
  // 暗杠  明杠  点杠
  static const String TOUCH = "TOUCH";
  static const String ANGANG = "ANGANG";
  static const String MINGGANG = "MINGGANG";
  static const String DIANGANG = "DIANGANG";
  // 庄家棋牌数量
  static const int BANKER_COUNT = 14;
  // 闲家棋牌数量
  static const int LEISURE_COUNT = 13;
}

enum UserPosition { LEFT, RIGHT, TOP, BOTTOM }

class UserActionConst {
  static final String OFF_LINE = "OFF_LINE";
  static final String ON_LINE = "ON_LINE";
}

class RoomDissolutionConst {
  RoomDissolutionConst._();
  //  已同意
  static final int agree = 1;
  // 已拒绝
  static final int refuse = 2;
  // 待处理
  static final int dvlue = 0;
}

class MessageTypeConst {
  MessageTypeConst._();
  static const int sound = 1;
  static const int chart = 2;
  static const int emoji = 3;
}

class MessageAction {
  MessageAction._();
  // 麻将的行为
  static const String ADD_HOME = "ADD_HOME";
  // 用户准备 prepare
  static const String PREPARE = "PREPARE";

  // 退出
  static const String LOG_OUT = "LOG_OUT";
  // 解散
  static final String DISSOLUTION = "DISSOLUTION";

  static final String INTERACTIVE = "INTERACTIVE";

  static const String READ_HOME = "READ_HOME";
  // 摇骰子
  static const String DISK_DICE = "DISK_DICE";

  // 游戏结束
  static const String CURRENT_GAME_OVER = "CURRENT_GAME_OVER";

  // 收牌
  static const String ACCEPT_DICE = "ACCEPT_DICE";
  // 交换牌指令
  static const String EXCHANGE_CARD = "EXCHANGE_CARD";
  // 出牌指令
  static const String EXPORT_CARD = "EXPORT_CARD";
  // 摸   碰   杠   胡  过
  // 报叫
  static const String CARD_CALL = "CARD_CALL";
  // 碰牌

  static const String CARD_TOUCH = "CARD_TOUCH";
  // 杠牌
  static const String CARD_BAR = "CARD_BAR";

  // 发牌
  static const String CARD_LICENSING = "CARD_LICENSING";

  // 胡牌
  static const String CARD_HU = "CARD_HU";

  // 过
  static const String ACTION_PASS = "ACTION_PASS";

  // message Tips
  static const String ACTION_TIPS = "ACTION_TIPS";

  static final String USER_UPDATE = "USER_UPDATE";
}

class RoomType {
  RoomType._();
  //  房间类型
  static final String WZ_MAHJONG = "WZ_MAHJONG";
  //  房间类型
  static final String CD_MAHJONG = "CD_MAHJONG";
}

class CacheConst {
  CacheConst._();
  static final String userInfo = "userinfo_cache";

  // 万州麻将规则
  static final String wzMachjongRuleCache = "wz_machjong_rule_cache";

  // 成都麻将规则
  static final String cdMachjongRuleCache = "cd_machjong_rule_cache";
}
